<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

return [
    // +----------------------------------------------------------------------
    // | 应用设置
    // +----------------------------------------------------------------------

    // 应用调试模式
    'app_debug'              => true,
    // 应用Trace
    'app_trace'              => false,
    // 应用模式状态
    'app_status'             => '',
    // 是否支持多模块
    'app_multi_module'       => true,
    // 入口自动绑定模块
    'auto_bind_module'       => true,
    // 注册的根命名空间
    'root_namespace'         => [],
    // 扩展函数文件
    'extra_file_list'        => [THINK_PATH . 'helper' . EXT],
    // 默认输出类型
//    'default_return_type'    => 'html',
    'default_return_type'    => 'json',
    // 默认AJAX 数据返回格式,可选json xml ...
    'default_ajax_return'    => 'json',
    // 默认JSONP格式返回的处理方法
    'default_jsonp_handler'  => 'jsonpReturn',
    // 默认JSONP处理方法
    'var_jsonp_handler'      => 'callback',
    // 默认时区
    'default_timezone'       => 'PRC',
    // 是否开启多语言
    'lang_switch_on'         => false,
    // 默认全局过滤方法 用逗号分隔多个
    'default_filter'         => 'htmlspecialchars',
    // 默认语言
    'default_lang'           => 'zh-cn',
    // 应用类库后缀
    'class_suffix'           => false,
    // 控制器类后缀
    'controller_suffix'      => false,

    // +----------------------------------------------------------------------
    // | 模块设置
    // +----------------------------------------------------------------------

    // 默认模块名
    'default_module'         => 'index',
    // 禁止访问模块
    'deny_module_list'       => ['common'],
    // 默认控制器名
    'default_controller'     => 'Index',
    // 默认操作名
    'default_action'         => 'index',
    // 默认验证器
    'default_validate'       => '',
    // 默认的空控制器名
    'empty_controller'       => 'Error',
    // 操作方法后缀
    'action_suffix'          => '',
    // 自动搜索控制器
    'controller_auto_search' => true,

    // +----------------------------------------------------------------------
    // | URL设置
    // +----------------------------------------------------------------------

    // PATHINFO变量名 用于兼容模式
    'var_pathinfo'           => 's',
    // 兼容PATH_INFO获取
    'pathinfo_fetch'         => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
    // pathinfo分隔符
    'pathinfo_depr'          => '/',
    // URL伪静态后缀
    'url_html_suffix'        => 'html',
    // URL普通方式参数 用于自动生成
    'url_common_param'       => false,
    // URL参数方式 0 按名称成对解析 1 按顺序解析
    'url_param_type'         => 0,
    // 是否开启路由
    'url_route_on'           => true,
    // 路由使用完整匹配
    'route_complete_match'   => false,
    // 路由配置文件（支持配置多个）
    'route_config_file'      => ['route'],
    // 是否强制使用路由
    'url_route_must'         => false,
    // 域名部署
    'url_domain_deploy'      => false,
    // 域名根，如thinkphp.cn
    'url_domain_root'        => '',
    // 是否自动转换URL中的控制器和操作名
    'url_convert'            => true,
    // 默认的访问控制器层
    'url_controller_layer'   => 'controller',
    // 表单请求类型伪装变量
    'var_method'             => '_method',
    // 表单ajax伪装变量
    'var_ajax'               => '_ajax',
    // 表单pjax伪装变量
    'var_pjax'               => '_pjax',
    // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则
    'request_cache'          => false,
    // 请求缓存有效期
    'request_cache_expire'   => null,
    // 全局请求缓存排除规则
    'request_cache_except'   => [],

    // +----------------------------------------------------------------------
    // | 模板设置
    // +----------------------------------------------------------------------

    'template'               => [
        // 模板引擎类型 支持 php think 支持扩展
        'type'         => 'Think',
        // 模板路径
        'view_path'    => '',
        // 模板后缀
        'view_suffix'  => 'html',
        // 模板文件名分隔符
        'view_depr'    => DS,
        // 模板引擎普通标签开始标记
        'tpl_begin'    => '{',
        // 模板引擎普通标签结束标记
        'tpl_end'      => '}',
        // 标签库标签开始标记
        'taglib_begin' => '{',
        // 标签库标签结束标记
        'taglib_end'   => '}',
    ],

    // 视图输出字符串内容替换
    'view_replace_str'       => [],
    // 默认跳转页面对应的模板文件
    'dispatch_success_tmpl'  => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',
    'dispatch_error_tmpl'    => THINK_PATH . 'tpl' . DS . 'dispatch_jump.tpl',

    // +----------------------------------------------------------------------
    // | 异常及错误设置
    // +----------------------------------------------------------------------

    // 异常页面的模板文件
    'exception_tmpl'         => THINK_PATH . 'tpl' . DS . 'think_exception.tpl',

    // 错误显示信息,非调试模式有效
    'error_message'          => '页面错误！请稍后再试～',
    // 显示错误信息
    'show_error_msg'         => false,
    // 异常处理handle类 留空使用 \think\exception\Handle
    'exception_handle'       => '',

    // +----------------------------------------------------------------------
    // | 日志设置
    // +----------------------------------------------------------------------

    'log'                    => [
        // 日志记录方式，内置 file socket 支持扩展
        'type'  => 'File',
        // 日志保存目录
        'path'  => LOG_PATH,
        // 日志记录级别
        'level' => [],
    ],

    // +----------------------------------------------------------------------
    // | Trace设置 开启 app_trace 后 有效
    // +----------------------------------------------------------------------
    'trace'                  => [
        // 内置Html Console 支持扩展
        'type' => 'Html',
    ],

    // +----------------------------------------------------------------------
    // | 缓存设置
    // +----------------------------------------------------------------------

    'cache'                  => [
        // 驱动方式
        'type'   => 'File',
        // 缓存保存目录
        'path'   => CACHE_PATH,
        // 缓存前缀
        'prefix' => '',
        // 缓存有效期 0表示永久缓存
        'expire' => 0,
    ],

    // +----------------------------------------------------------------------
    // | 会话设置
    // +----------------------------------------------------------------------

    'session'                => [
        //'id'             => '',
        // SESSION_ID的提交变量,解决flash上传跨域
        //'var_session_id' => '',
        // SESSION 前缀
        'prefix'         => 'think',
        // 驱动方式 支持redis memcache memcached
        'type'           => '',
        // 是否自动开启 SESSION
        'auto_start'     => true,
        //过期时间
        'expire'         => 3600*24,
    ],

    // +----------------------------------------------------------------------
    // | Cookie设置
    // +----------------------------------------------------------------------
    'cookie'                 => [
        // cookie 名称前缀
        'prefix'    => '',
        // cookie 保存时间
        'expire'    => 3600*24,
        // cookie 保存路径
        'path'      => '/',
        // cookie 有效域名
        'domain'    => '',
        //  cookie 启用安全传输
        'secure'    => false,
        // httponly设置
        'httponly'  => '',
        // 是否使用 setcookie
        'setcookie' => true,
    ],

    //分页配置
    'paginate'               => [
        'type'      => 'bootstrap',
        'var_page'  => 'page',
        'list_rows' => 15,
    ],
    // 七牛云参数配置
    'qiniu'     => [
        'accessKey'      => 'zY63yzsI3zMLVK5ulpfyjq0ENYZ9wv7VfHebIaVC',
        'secretKey'      => '3sRTVn3S-GfmYVFx-lWzJ7zPyAYevMU72THPLPCR',
        'bucket'         => 'growthup',
        'domainName'     => 'http://resource.growthupup.com/',//门店
        'thumbnail'      => '?imageView2/2/h/100',
        'merchantBucket' => 'merchant',
        'merchantDomain' => 'https://document.growthupup.com/'//商户
    ],
    // 易宝参数配置
    'yeepay'   =>[
            'appKey'             => 'OPR:10024438625',
            'parentMerchantNo'   => '10024438625',
            'private_key'        => 'MIIEpQIBAAKCAQEA3U55Kx3rxA8z4fZDFGtB+++lKyEBWizdqn1HShdUWisFpwlVYeooN6mMX++yPcXY9zD8gUHaYT1Zx624XkJ8Xj1XZ4M0/SPPpaF9mg25pYhwE5/4+cRAkHP1zfFKTzqLpaSl9+MvdvHyNYxBZvqT/4ZA+pzk4Tef9+BAPe84ENvHUxmKhaE8YQso5CzJNdUT9UAhYS3zljib6OnK4mBhs9US+h2Q6Wa/NT1PhDYuO9dGyd46BlIgvTeZf1tqJ/bmKxl/XFrzTl/bxDy1ZQLd3GPkt3riu7BSn4Mno0DP3sGgaQWCiHWGZw2KMhTLE5MGx/WvifdpIpop4NvbdmQWXQIDAQABAoIBADLKbNKxdkez+YNVooWQLD+m+3BPjeDlRSZ4xCDEA+8ByrVQVhE3zW0g83+dIno86xOoYXtE4trIWs+SFitD9Qkn6ORv33xteJ2Z15rApafRDW/jmh+wo+TDSFmwlA5k8GHezNx8fos88grKGsSIo+jUJhueYIUz3/nitLvCKErtyH63AVDLekTmjVpJh++P1/ZqUkLsASVC91emfITLCZHWDefam4RxryY9AI9eAE1n47J1n2thkY9pjTOJQmX9hvBKMTmwn5JOR8z0TKn2iam3JE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8Xj1XZ4M0/SPPpaF9mg25pYhwE5/4+cRAkHP1zfFKTzqLpaSl9+MvdvHyNYxBZvqT/4ZA+pzk4Tef9+BAPe84ENvHUxmKhaE8YQso5CzJNdUT9UAhYS3zljib6OnK4mBhs9US+h2Q6Wa/NT1PhDYuO9dGyd46BlIgvTeZf1tqJ/bmKxl/XFrzTl/bxDy1ZQLd3GPkt3riu7BSn4Mno0DP3sGgaQWCiHWGZw2KMhTLE5MGx/WvifdpIpop4NvbdmQWXQIDAQAB',
            'head_url'           =>'https://open.yeepay.com/yop-center',
    ],
    // 商户注册实名认证时传本地服务器存储图片路径
    'base_image_dir'  => '/home/resource/',

    // 提现收取商户的手续费费率
    'withdraw_fee_rate' => 0,

    // 商户认证时联系邮箱
    'merchant_identify_email' => 'yibaohetong@zengduokeji.com',

    // 商户注册实名认证时开通产品productInfo
    'productInfo' => '{"payProductMap":{"SMALL_PROGRAM_PAYMENT":{"dsPayBankMap":{"SMALL_PROGRAM_PAYMENT_OFFLINE":{"rateType":"PERCENTAGE","rate":"0.38"}}}},"payScenarioMap":{"FACE_TO_FACE_ACCESS":{}},"withdrawProductMap":{"WITHDRAW_D1":{"dsWithdrawBankMap":{"WITHDRAW_WORKDAY":{"rateType":"MIXED","fixedRate":"0.5","percentRate":"0.02"},"WITHDRAW_WEEKDAY":{"rateType":"MIXED","fixedRate":"0.5","percentRate":"0.02"}}}},"settlementProductMap":{"MERCHANT_SETTLEMENT":{"feeBearParty":"SUB_MERCHANT","dsSettlementBankMap":{"SETTLEMENT_T1":{"rateType":"MIXED","fixedRate":"0","percentRate": "0","settlementType":"SELF_SERVICE"}}}}}',

    // 商户业务功能
    'businessFunction' => '{"PARENT_MERCHANT_FEE_BEAR":["YES"]}',
];